home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / ARexxTools / TritonRexx376.lha / TritonRexx / Rexx / CheckBox.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-09-17  |  1.8 KB  |  74 lines

  1. /* CheckBox.rexx */
  2.  
  3. IF ~SHOW('LIBRARIES','tritonrexx.library') THEN DO
  4.    IF ~ADDLIB('tritonrexx.library',10,-30,0) THEN DO
  5.       SAY 'Kann die <tritonrexx.library> nicht öffnen!'
  6.       EXIT(10)
  7.    END
  8. END
  9.  
  10. windowtags =   WindowID(1),
  11.                WindowTitle('CheckBox'),
  12.                   'VertGroupA',
  13.                      'Space',
  14.                      'HorizGroupAC',
  15.                         'Space',
  16.                         TextID("_CheckBox",10),
  17.                         'Space',
  18.                         CheckBox(10),
  19.                         'Space',
  20.                      'EndGroup',
  21.                      'Space',
  22.                   'EndGroup',
  23.                'EndProject'
  24.  
  25. app = TR_CREATEAPP('TRCA_Name CheckBox')
  26.  
  27. IF app ~= '00000000'x THEN DO
  28.  
  29.    window = TR_OPENPROJECT(app,windowtags)
  30.  
  31.    IF window ~= '00000000'x THEN DO
  32.       ende = 0
  33.  
  34.       DO WHILE ende ~= 1
  35.          CALL TR_WAIT(app,'')
  36.  
  37.          DO WHILE TR_HANDLEMSG(app,'event')
  38.             IF event.trm_class = 'TRMS_NEWVALUE' THEN DO
  39.                SELECT
  40.                   WHEN event.trm_id = 10 THEN DO
  41.                      IF event.trm_data = 0 THEN
  42.                         SAY 'CheckBox aus'
  43.  
  44.                      IF event.trm_data = 1 THEN
  45.                         SAY 'CheckBox an'
  46.                   END
  47.  
  48.                   OTHERWISE
  49.                      NOP
  50.                END
  51.             END
  52.  
  53.             IF event.trm_class = 'TRMS_CLOSEWINDOW' THEN DO
  54.                status = TR_GETATTRIBUTE(window,10,'TRAT_Value')
  55.  
  56.                IF status = 0 THEN
  57.                   SAY 'CheckBox war aus'
  58.  
  59.                IF status = 1 THEN
  60.                   SAY 'CheckBox war an'
  61.  
  62.                ende = 1
  63.             END
  64.          END
  65.       END
  66.  
  67.       CALL TR_CLOSEPROJECT(window)
  68.    END
  69.  
  70.    CALL TR_DELETEAPP(app)
  71. END
  72.  
  73. EXIT(0)
  74.